package felix.rule.data.plugin;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class ComponentDescriptor {

    private String id;

    private ComponentType type;

    private String name;

    private String clazz;

    private transient JsonNode configurationDescriptor;

    public ComponentDescriptor(String id) {
        this.id = id;
    }

    public ComponentDescriptor(ComponentDescriptor plugin) {
        this.id = plugin.getId();
        this.type = plugin.getType();
        this.name = plugin.getName();
        this.clazz = plugin.getClazz();
        this.configurationDescriptor = plugin.getConfigurationDescriptor();
    }
}
